<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>客户组管理管理</title>
	<meta name="decorator" content="default"/>
	<style type="text/css">
		form{
			width:80%;
			margin:auto;
		}
		.buttons{
			width:100%;text-align:center;
		}
		.buttons .ui-btn{
			width:42%;		
		}
	</style>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<form:form id="inputForm" modelAttribute="customerGroup" action="${ctx}/base/customerGroup/save" method="post">
		<form:hidden path="id"/>
		<form:hidden path="store.id" value="${fns:getStore().id}"/>
		<div class="icon-buttons">
			<a href="${ctx}/base/customerGroup/" data-icon="back" data-iconpos="notext" data-role="button" data-inline="true">返回</a>
			<input id="btnSubmit" type="submit" data-icon="check" data-iconpos="notext" value="保 存" data-inline="true"/>
		</div>
		<tags:message content="${message}"/>
		<div data-role="fieldcontain">
   			<label for="groupName">组名:</label>
    		<form:input path="groupName" class="required" />
		</div>
	</form:form>
</body>
</html>
